<!doctype html>
<html>

	<head>
		<meta charset="UTF-8">
		<title></title>
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<link href="../../../css/mui.min.css" rel="stylesheet" />
		<!--<link rel="stylesheet" href="../../css/allApp.css" />-->
		<link rel="stylesheet" href="../css/css.css" />
		<style type="text/css">
			body,.mui-content{
				background-color: #FFFFFF;
			}
			.mui-bar .mui-title {
				right: 80px;
				left: 80px;
			} 
			.yxj-row{
				width: 100%;
				padding: 10px 10px 0;
				border-bottom: 1px solid #eaeaea;
				position: relative;
				display: flex;
				align-items: center;
				justify-content: space-around;
			}
			.marbtm{
				margin-bottom: 6px;
				text-overflow: ellipsis;
			}
			.colorA3A3A3{
				color: #A3A3A3;
			}
			.color1A5186{
				color: #1A5186;	
			}
			.flex{
				display: flex;
			}
			.justcnt{
				justify-content: space-between;
			}
			.fontsize13{
				font-size: 13px;
			}
			.fontsize15{
				font-size: 15px;
			}
			.yxj-arrow{
				color: rgba(0, 0, 0, .5);
				/* position: absolute;
				right: 5px;
				top: 23px; */
				font-size: 22px;
			}
			.mui-radio input[type=radio] {
				top: 3px!important;
			}
			.zdycomfirm {
				z-index: 1000000000000000;
				background-color: #FFFFFF;
				display: none;
				width: 80%;
				left: 10%;
				height: 200px;
				position: absolute;
				top: 30%;
				border-radius: 5px;
			}
			
			.zdytitle {
				height: 44px;
				line-height: 44px;
				color: #777777;
				text-align: center;
			}
			
			.zdycnt {
				height: 112px;
				padding-left: 12px;
				padding-top: 10px;
				line-height: 25px;
			}
			
			.zdybtn {
				display: flex;
			}
			
			.zdybtn div {
				width: 50%;
				height: 44px;
				line-height: 44px;
				text-align: center;
				color: #007aff;
			
			}
			
			.zdyquit {
				border-right: 1px solid #EFEFF4;
			}
			
			.mui-input-group .mui-input-row:after {
				height: 0px;
			}
			
			.zdyform {
				height: 112px;
				padding-top: 7px;
			}
			
			.zdyradio {
				display: flex;
			}
			
			.zdytt {
				border: 1px solid #c8c7cc !important;
				width: 75%;
				margin-left: 5%;
				height: 60px;
			}	
			.hsyy,.ifsubmit{
				display: none;
			}
			.outer-border{
				width: 100%;
				padding:15px;
				border-top: 5px solid #eaeaea;
			}
			.common-title{
				border-left: 3px solid #1A5186;
				line-height: 17px;
				padding-left: 4px;
			}
			.p-base-msg{
				display: flex;
				justify-content: space-between;
				margin-top: 6px;
				font-size: 14px;
			}
			.borderbottom{
				border-bottom: 0px;
			}
		</style>
	</head>

	<body>
		<header class="mui-bar mui-bar-nav">
			<a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
			<h1 class="mui-title"></h1>
		</header>
		<div class="mui-content" id="content" >
			<div class="outer-border">
				<div class="common-title">
					基本信息
				</div>
				<div class="p-base-msg">
					<span>
						<font class="colorA3A3A3">巡检人:</font>
						<font>{{basemsg.username}}</font>
					</span>
					<span>
						<font class="colorA3A3A3">协助人:</font>
						<font>{{basemsg.helpusernames}}</font>
					</span>
				</div>
				<div class="p-base-msg">
					<span>
						<font class="colorA3A3A3">开始时间:</font>
						<font>{{basemsg.start_time}}</font>
					</span>
				</div>
				<div class="p-base-msg">
					<span>
						<font class="colorA3A3A3">结束时间:</font>
						<font>{{basemsg.end_time}}</font>
					</span>
				</div>
			</div>
			<div class="outer-border">
				<div class="common-title">
					巡检项
				</div>
				<div class="mui-row yxj-row" v-for="(item,index) in data" :class="data.length-1==index?'borderbottom':''" :key="index" :data-id="(item.id)" >
					<div style="width: 100%;">
						<div class="marbtm fontsize15">设备名称：{{item.name}}</div>
						<div class="colorA3A3A3 fontsize13">设备编号：{{item.number}}</div>
					</div>
					<span id="replace_icon" class="yxj-arrow" >
						<a class="mui-icon mui-icon-arrowright mui-icon-right-nav mui-pull-right"></a>
					</span>
				</div>  
			</div>
			<div class="outer-border">
				<div class="common-title">
					审核项
				</div>
				<div class="zdycnt fontsize15">
					<span>
						<font class="colorA3A3A3">审核人:</font>
						<font>{{basemsg.reviewname}}</font>
					</span><br/>
					<span>
						<font class="colorA3A3A3">意见:</font>
						<font>{{basemsg.reject_reason}}</font>
					</span><br/>
					<span>
						<font class="colorA3A3A3">审核时间:</font>
						<font>{{basemsg.review_time}}</font>
					</span>
				</div>
			</div>
		</div>
		<script src="../../../js/mui.min.js"></script>
		<script type="text/javascript" src="../../../js/mkeyplus.base.xunjian.js"></script>
		<script type="text/javascript" src="../../../js/vue.js"></script>
		<script type="text/javascript" src="../../../js/jquery-1.7.2.min.js"></script>
		<script type="text/javascript">
			mui.init()
			window.vm = new Vue({
				el: "#content",
				data: {
					data: [{
						id:'',
						name:'',
						number:''
					}],
					basemsg:''
				}
			});
			
			var org_code1 = '';
			var sbid = '';
			var from = '';
			var checkValue = '';
			mui.plusReady(function() {
				//选择审核意见
				$(':radio').click(function() {
					checkValue = $(this).val();
					if (checkValue == 'no') {
						$('.hsyy').css('display', 'block');
					} else {
						$('.hsyy').css('display', 'none');
					}
				});
				
				var org_code = localStorage.getItem('org_code'); //获取缓存中的风场编号
				org_code1 = JSON.parse(org_code);
				var self = plus.webview.currentWebview();
				sbid = self.sbid;
				from = self.from;
				document.querySelector('.mui-title').innerText = self.title;
				getBaseMsg();
				getXCXunjian();
				getData();
			})
			
			function getBaseMsg(){
				mui.baseApp.httpRequst('/api/v2/sbxj/XsdWindInfo', {
						xsdWindId:sbid
					},
					function(res) {
						console.log('1xx..'+JSON.stringify(res));
						vm.basemsg = res.data;
					},
					function(err) {}
				)
			}
			
			function getData() {
				mui.baseApp.httpRequst('/api/v2/sbxj/xjList', {
						wind: org_code1,
						xsdWindId: sbid
					},
					function(res) {
						console.log(JSON.stringify(res));
						vm.data = res.data.list;
						if(from == 'dsh' && res.data.list.length > 0){
							$('.ifsubmit').css('display','block');
						} 
					}
				);
			}
			
			
			function getXCXunjian(){
				$('#content').on('tap', '.yxj-row', function() {
					var Type = $(this).attr('data-type');
					var id = $(this).attr('data-id');
					mui.openWindow({
						url: '../yulan.html',
						id: '../yulan.html',
						extras: {
							_id: id,
							Type: Type
						},
						createNew: false
					})
				});
			}
		</script>
	</body>

</html>